#ifndef __LUA_DB_UTILS_H__
#define __LUA_DB_UTILS_H__
#include "../common/Lunar.h"

extern "C" 
{
    #include "mongo.h"
}

class LuaDBUtils
{
public:
    static bool LuaToBson(lua_State* pL,int nStackPos,bson* b,bool isArray=false);
    static bool BsonToLua(lua_State* pL,const bson* b,bool isArray=false);
public:
    static int CheckArray(lua_State* pL,int nStackPos);
    static bool IsDigit(const char* str);
    static void SetValue(lua_State* pL,const char* pKey,bool isArray = false);
};
//extern LuaDBUtils g_oLuaDBUtils;

#endif
